From 86ae1df257ce51940f787e922cfe903b0a17b663 Mon Sep 17 00:00:00 2001 From: Matthias Clasen Date: Fri, 1 Dec 2017 10:16:20 -0500 Subject: [PATCH] filechooser: Remove the word stock from the docs It does not really add anything here, and makes it harder to grep for occurrences of stock ids. --- gtk/gtkfilechooser.c | 14 +++++++------- gtk/gtkfilechooserdialog.c | 10 +++++----- 2 files changed, 12 insertions(+), 12 deletions(-) diff --git a/gtk/gtkfilechooser.c b/gtk/gtkfilechooser.c index 8463ce4f2d..4949cea35c 100644 --- a/gtk/gtkfilechooser.c +++ b/gtk/gtkfilechooser.c @@ -306,7 +306,7 @@ gtk_file_chooser_default_init (GtkFileChooserInterface *iface) * Most applications just need to turn on the * #GtkFileChooser:do-overwrite-confirmation property (or call the * gtk_file_chooser_set_do_overwrite_confirmation() function), and - * they will automatically get a stock confirmation dialog. + * they will automatically get a standard confirmation dialog. * Applications which need to customize this behavior should do * that, and also connect to the #GtkFileChooser::confirm-overwrite * signal. @@ -318,7 +318,7 @@ gtk_file_chooser_default_init (GtkFileChooserInterface *iface) * %GTK_FILE_CHOOSER_CONFIRMATION_SELECT_AGAIN. If it determines * that the user is satisfied with his choice of file name, it * should return %GTK_FILE_CHOOSER_CONFIRMATION_ACCEPT_FILENAME. - * On the other hand, if it determines that the stock confirmation + * On the other hand, if it determines that the standard confirmation * dialog should be used, it should return * %GTK_FILE_CHOOSER_CONFIRMATION_CONFIRM. The following example * illustrates this. @@ -404,7 +404,7 @@ gtk_file_chooser_default_init (GtkFileChooserInterface *iface) g_object_interface_install_property (iface, g_param_spec_boolean ("use-preview-label", P_("Use Preview Label"), - P_("Whether to display a stock label with the name of the previewed file."), + P_("Whether to display a label with the name of the previewed file."), TRUE, GTK_PARAM_READWRITE)); g_object_interface_install_property (iface, @@ -1634,9 +1634,9 @@ gtk_file_chooser_get_preview_widget_active (GtkFileChooser *chooser) /** * gtk_file_chooser_set_use_preview_label: * @chooser: a #GtkFileChooser - * @use_label: whether to display a stock label with the name of the previewed file + * @use_label: whether to display a label with the name of the previewed file * - * Sets whether the file chooser should display a stock label with the name of + * Sets whether the file chooser should display a label with the name of * the file that is being previewed; the default is %TRUE. Applications that * want to draw the whole preview area themselves should set this to %FALSE and * display the name themselves in their preview widget. @@ -1658,7 +1658,7 @@ gtk_file_chooser_set_use_preview_label (GtkFileChooser *chooser, * gtk_file_chooser_get_use_preview_label: * @chooser: a #GtkFileChooser * - * Gets whether a stock label should be drawn with the name of the previewed + * Gets whether a label should be drawn with the name of the previewed * file. See gtk_file_chooser_set_use_preview_label(). * * Returns: %TRUE if the file chooser is set to display a label with the @@ -2224,7 +2224,7 @@ gtk_file_chooser_get_show_hidden (GtkFileChooser *chooser) * If set to %TRUE, the @chooser will emit the * #GtkFileChooser::confirm-overwrite signal when appropriate. * - * If all you need is the stock confirmation dialog, set this property to %TRUE. + * If all you need is the standard confirmation dialog, set this property to %TRUE. * You can override the way confirmation is done by actually handling the * #GtkFileChooser::confirm-overwrite signal; please refer to its documentation * for the details. diff --git a/gtk/gtkfilechooserdialog.c b/gtk/gtkfilechooserdialog.c index 57bef49ffc..701fa1a3f7 100644 --- a/gtk/gtkfilechooserdialog.c +++ b/gtk/gtkfilechooserdialog.c @@ -181,7 +181,7 @@ * NULL); * ]| * - * This will create buttons for “Cancel” and “Open” that use stock + * This will create buttons for “Cancel” and “Open” that use predefined * response identifiers from #GtkResponseType. For most dialog * boxes you can use your own custom response codes rather than the * ones in #GtkResponseType, but #GtkFileChooserDialog assumes that @@ -200,7 +200,7 @@ * appropriate. * * To summarize, make sure you use a - * [stock response code][gtkfilechooserdialog-responses] + * [predefined response code][gtkfilechooserdialog-responses] * when you use #GtkFileChooserDialog to ensure proper operation. */ @@ -328,7 +328,7 @@ get_accept_action_widget (GtkDialog *dialog, } static gboolean -is_stock_accept_response_id (gint response_id) +is_accept_response_id (gint response_id) { return (response_id == GTK_RESPONSE_ACCEPT || response_id == GTK_RESPONSE_OK || @@ -645,7 +645,7 @@ response_cb (GtkDialog *dialog, priv = gtk_file_chooser_dialog_get_instance_private (GTK_FILE_CHOOSER_DIALOG (dialog)); /* Act only on response IDs we recognize */ - if (is_stock_accept_response_id (response_id) && + if (is_accept_response_id (response_id) && !priv->response_requested && !_gtk_file_chooser_embed_should_respond (GTK_FILE_CHOOSER_EMBED (priv->widget))) { @@ -689,7 +689,7 @@ gtk_file_chooser_dialog_new_valist (const gchar *title, * @title: (allow-none): Title of the dialog, or %NULL * @parent: (allow-none): Transient parent of the dialog, or %NULL * @action: Open or save mode for the dialog - * @first_button_text: (allow-none): stock ID or text to go in the first button, or %NULL + * @first_button_text: (allow-none): text to go in the first button, or %NULL * @...: response ID for the first button, then additional (button, id) pairs, ending with %NULL * * Creates a new #GtkFileChooserDialog. This function is analogous to -- 2.30.2